package cn.tedu.oop;

public class Test1_Constructor {
    public static void main(String[] args) {
        new Student("1",2);
        new Student();
        new Student("1");
        new Student(1);
        new Student(1,2);
    }
}
class Student{
    public Student(String a, int b){
        System.out.println("含参构造，名字是："+a+",年龄是："+b);
    }
    public Student(){}
    public Student(String name){
        System.out.println("含参构造方法"+name);
    }
    public Student(int a){
        System.out.println("含参构造方法"+a);
    }
    public Student(int a, int b){
        System.out.println("含参构造方法"+a+b);
    }
}